from django.urls import path
from book import views
from rest_framework import routers
# urlpatterns = [
#     path('blist/',views.Booklist.as_view({'get':"list",'post':'create'})),
#     path('plist/',views. Publist.as_view({'get':"list",'post':'create'})),
#     path('blist/<int:pk>/',views. Booklist1.as_view({'get':'retrieve','put':'update','delete':'destroy'})),
#     path('plist/<int:pk>/',views. Publist1.as_view({'get':'retrieve','put':'update','delete':'destroy'})),

    # path('blist/',views.Booklist.as_view({'get':"list",'post':'create'})),
    # path('plist/',views. Publist.as_view()),
    # path('blist/<int:pk>/',views. Booklist1.as_view({'get':'retrieve','put':'update','delete':'destoy'})),
    # path('plist/<int:pk>/',views. Publist1.as_view()),
# ]

router = routers.DefaultRouter()
router.register('blist',views.Booklist)
router.register('plist',views.Publist)
urlpatterns = router.urls






